package io.practice;

import java.io.*;

public class Practice02 {
    public static void main(String[] args) throws IOException {
        try(OutputStream os = new FileOutputStream("outPut.txt")){
            try(OutputStreamWriter osWriter = new OutputStreamWriter(os, "UTF-8")){
                try(PrintWriter writer = new PrintWriter(osWriter)){
                    writer.print("hello");
                    writer.println("你好！");
                    writer.printf("%d : %s", 1, "我很好！");

                    writer.flush();
                }
            }
        }
    }
}
